package com.cresch.ical.downloader.ical;

import java.util.Comparator;

/**
 * 
 * @author Resch Christian
 *
 */
public class VEventComperator implements Comparator {

	@Override
	public int compare(Object object1, Object object2) {
		VEvent event1 = (VEvent)object1;
		VEvent event2 = (VEvent)object2;
		int result = 0;
		
		if (event1.getStart().after(event2.getStart())) {
			result = 1;
		}
		if (event1.getStart().before(event2.getStart())) {
			result = -1;
		}
		return result;
	}
}
